map

open fun <E1, V1> map(@NonNull() errorFun: Expected.Transformer<E, E1>, @NonNull() valueFun: Expected.Transformer<V, V1>): Expected<E1, V1>

Map both value or error to a new type.

Return

new expected with transformed value or error

Parameters

errorFun

Function handling the case when error is present.

valueFun

Function handling the case when value is present.